package algos;

import ue.UE;
import eNodeB.ENodeB;
import eNodeB.RessourceBlock;

public abstract class AAlgos implements Runnable {
	protected final ENodeB eNodeB;

	public AAlgos(ENodeB eNodeB) {
		this.eNodeB = eNodeB;
	}

	protected boolean schedule(UE ue, RessourceBlock rb) {
		if (eNodeB.getPoolRessourceBlocksSize() <= eNodeB
				.getMaxRessourceBlocks()) {
			eNodeB.mapRessourceBlock(ue, rb);
			return true;
		}

		return false;

	}
}
